package com.zhn.evsi.client;

import com.alibaba.fastjson.JSONObject;
import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.Request;
import com.dtflys.forest.annotation.Retry;
import com.dtflys.forest.annotation.Var;
import com.zhn.evsi.domain.dto.evsi.EvsiCharacterAttributesDTO;
import com.zhn.evsi.interceptor.TokenInterceptor;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@BaseRequest(baseURL = "${eveData}${eveDataSns}")
@Retry(maxRetryCount = "3", maxRetryInterval = "1000")
public interface SkillClient {

    // 2119634223
    /**
     * 属性点
     * */
    @Request(
            url = "/characters/{characters}/attributes/?datasource=tranquility",
            type = "GET",
            interceptor = TokenInterceptor.class
    )
    EvsiCharacterAttributesDTO attributes(@Var("characters") Integer characters);

    /**
     * 技能队列
     * */
    @Request(
            url = "/characters/{characters}/skillqueue/?datasource=tranquility",
            type = "GET",
            interceptor = TokenInterceptor.class
    )
    List<JSONObject> skillQueue(@Var("characters") Integer characters);

    /**
     * 技能列表
     * */
    @Request(
            url = "/characters/{characters}/skills/?datasource=tranquility",
            type = "GET",
            interceptor = TokenInterceptor.class
    )
    JSONObject skills(@Var("characters") Integer characters);
}
